#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
#include<math.h>
int main()
{
    int x1 = 0;
    int y1 = 0;
    int x2 = 0;
    int y2 = 0;
    scanf("%d%d", &x1, &y1);
    getchar();
    scanf("%d%d", &x2, &y2);
    double d = pow(x1 - x2, 2) + pow(y1 - y2, 2);
    printf("%.0f\n", d);

    return 0;
}